package com.woniu.service.impl;

import com.woniu.adapter.MaterialClassificationTypeAdapter;
import com.woniu.outlet.po.MaterialClassificationTypePo;
import com.woniu.service.MaterialClassificationTypeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Slf4j
public class MaterialClassificationTypeServiceImpl implements MaterialClassificationTypeService {

    @Autowired
    private MaterialClassificationTypeAdapter materialClassificationTypeAdapter;

    @Override
    public List<MaterialClassificationTypePo> findMaterialClassificationTypes() throws Exception {
        List<MaterialClassificationTypePo> materialClassificationTypePos = materialClassificationTypeAdapter.findMaterialClassificationTypes();
        return materialClassificationTypePos;
    }

    @Override
    public MaterialClassificationTypePo getMaterialClassificationTypeById(Long id) throws Exception {
        return materialClassificationTypeAdapter.getMaterialClassificationTypeById(id);
    }
}
